package com.labofjet.controller;

import java.io.IOException;
import java.util.Random;

import javax.servlet.http.HttpSession;

import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.ResourceEditor;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class TestController2 {
    @RequestMapping("/test26")
    public Object test26(Model m, String modelArrt, HttpSession session) throws IOException {
        session.setAttribute("modelArrt", 777);
        ResourceEditor re = new ResourceEditor();
        re.setAsText("classpath:../web.xml");
        System.out.println(((ClassPathResource)re.getValue()).getURL());
        return "{\"a\":\"呵呵\"}";
    }
}
